package io.jee.caisan.weixin.domain;

import java.util.Map;
import java.util.TreeMap;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.hibernate.annotations.DynamicUpdate;

/**
 * 系统配置表
 * 
 * @author xiexx
 *
 */
@Entity
@DynamicUpdate
public class SysConfig {
	
	/** 充值公告 */
	public static final Integer TYPE_0 = 0;
	/** 登录公告 */
	public static final Integer TYPE_1 = 1;
	/** 签到提醒 */
	public static final Integer TYPE_2 = 2;
	/** 分类{0:充值公告,1:登录公告,2:签到提醒} */
	public static final Map<Integer, String> allTypes = new TreeMap<>();
	static {
		allTypes.put(TYPE_0, "充值公告");
		allTypes.put(TYPE_1, "登录公告");
		allTypes.put(TYPE_2, "签到提醒");
	}
	
	/** ID */
	private Integer id;
	/** 分类{0:充值公告,1:登录公告,2:签到提醒} */
	private Integer type;
	/** 内容 */
	private String content;
	/** 排序 */
	private Integer sort;
	/** 是否启用 */
	private boolean enable;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

}
